import { pick } from 'lodash-es';
import DefaultParam from '../../common/DefaultParam';

class SubResearchIssueFeedbackParam extends DefaultParam {
  constructor(data, files = [], isSaveFile = true) {
    super(data, files, isSaveFile);
  }

  /**
   * 保存数据格式化
   * @param {*} data
   * @returns
   */
  setData() {
    const {
      // 联系人
      contract,
      // 联系电话
      contractPhone,
      countersign,
      problem,
      departmentFeedback,
    } = this.data;
    return {
      ...this.getDefaultParam(),
      // 联系人
      contactser: contract,
      // 联系电话
      telphone: contractPhone,
      // 会签部门
      signDept: countersign,
      // 问题反馈
      problem: {
        ...problem,
        departmentFeedback,
      },
    };
  }
}
export default SubResearchIssueFeedbackParam;
